<?php 
$conn = mysqli_connect('127.0.0.1','root','123456','zhiwen');
mysqli_query($conn,'SET NAMES UTF8');
$sql = 'SELECT * FROM phrase';
$result = mysqli_query($conn,$sql);
$books = [];
while ($row = mysqli_fetch_array($result)) {
   array_push($books,$row);
}
 ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>只言片语</title>
    <link rel="stylesheet" href="../CSS/book-phrase.css">
    <script src="../JS/book-phrase.js"></script>
    <link rel="stylesheet" href="../CSS/Comment.css">
    <link rel="stylesheet" href="../css/bottom.css">
    <script src="../js/jquery-3.1.1.js"></script>
</head>
<body>
    <header>
      
    </header><!--header-->
    <div class="big">
        <!--first首行-->
        <div class="moodList">
        <h1 class="first">
            <a href="HomePage.php" class="first1">网站首页</a>
            <a href="book-phrase.php" class="first2">只言片语</a>
            <span>删删写写，回回忆忆，虽无法行云流水，却也可只言片语。</span>
        </h1>
        </div><!--moodList-->
        <div class="contentList">
            <?php foreach ($books as  $zhiwen) { ?>
            <div class="arrow_box">
                <div class="say">
                    <p>
                        <img src="<?php echo($zhiwen['img']) ?>">
                            <?php echo($zhiwen['introduction']) ?>
                    </p>
                    <span class="author">
                         <?php echo($zhiwen['author']) ?>   <?php echo($zhiwen['bname']) ?>
                    </span>
                </div>
                <a href="" class="buy">购买</a>
                <span class="date">2015-05-16</span>
            </div>
            <?php }  ?>
        </div><!--contentList-->
    </div><!--big-->
    <div id="Bottom_bottom">

    </div>
    <script>
     $('header').load('header.php');
     $('#Bottom_bottom').load('bottom.html')
    </script>
</body>
</html>